from concurrent.futures import ThreadPoolExecutor
import time


def task(name: str, age: int):
    print(f"{name} - step 1\n", end="")
    time.sleep(1)
    print(f"{name} - step 2\n", end="")
    
    return f"{name} complete"
    
    
with ThreadPoolExecutor() as executor:
    result_1 = executor.submit(task, "A", 11)
    result_2 = executor.submit(task, "B", 12)
    
    print(result_1.result())  # result()会等待有结果再返回
    print(result_2.result())